﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using Pibby.Core;


namespace Pibby.Core.Tests
{
	[TestClass]
	public class DownloadableCollectionTests
	{
		[TestMethod]
		public void CanCalculateTotalSizeOfCollection()
		{
			DownloadableCollection collection = new DownloadableCollection();

			for (int i = 0; i < 10; ++i)
			{
				collection.Add(new Downloadable()
				{
					Uri = new Uri ("http://example.com"),
					TargetFolder = "C:\\Folder",
					FileSize = 100
				});
			}

			Assert.AreEqual(1000, collection.TotalSize, "File Size of collection is not calculated correctly");
		}

	}
}
